1. Field of the Invention
The present invention relates to clock synchronization methods and system for executing such methods. In particular, the present invention relates to a method for using an isochronous or time dependant endpoint to adaptively synchronize the output clock rate of a Universal Serial Bus (USB) data sink to a USB data source input clock rate, without using feed back techniques, feed forward techniques or additional clock signals.
2. Description of the Related Art
In a synchronous communication system having a data source and a data sink, the data output from a data sink is expected to be synchronous with the data input to a data source. When the data source and the data sink are connected using a USB, the data input clock is not synchronous with a USB clock. Therefore, the USB clock does not allow the data output to be synchronized to the data input, even if the data output clock is synchronized to the USB clock. The difference between the input and output clocks leads to a frequency mismatch and subsequent data corruption.
Some systems, which do not require a high degree of data accuracy, can tolerate such frequency mismatch and data corruption. Typical low cost audio applications using a non-synchronized USB audio source (e.g. CD) and USB audio sink (e.g. speakers) are not significantly degraded audibly if audio samples are discarded or inserted to accommodate clock mismatch.
However, for real-time ISDN applications such as video, data loss due to clock frequency mismatch noticeably affects the quality of the service. The mismatch produces effects such as picture freezing and is much less tolerable.
Techniques that can perform clock synchronization between the data input clock and the USB clock have limited application due to the fact that they can only synchronize the USB clock to a limited degree of accuracy. For an application involving a mobile phone using a USB interface to access synchronous services via an ISDN interface, one possible synchronization option is a method referred to as clock mastering for asynchronous source device and synchronous sink device. This method involves the source device influencing a USB host's SOF (Start Of Frame) generation, so that isochronous data transfer is synchronized to the source device. The host SOF rate (1 mS) is adjusted to track the mobile phone's data frame rate (10 mS). An ISDN interface is a USB synchronous sink device, i.e., locked to the SOF clock, and the frame transfer from the mobile phone to the ISDN interface is synchronized. The ISDN clock, i.e., I.430 192 KHz bit clock is synchronized to the SOF clock. The SOF adjustment resolution is 1/12000-bit times, where a bit period is one 12 MHz clock cycle or 83 ppm (parts per million).
Due to this coarse clock resolution, the source device is not able to select a single optimum SOF period. The source device clock of a mobile phone is locked to the mobile network and is very accurate with the result that the frequency error may approach 83 ppm. As this would still cause frame drift, the source device needs to continuously switch the SOF bit period up and down to achieve a synchronized average SOF period. The sink device must then track the average of the SOF period, as a step of 83 ppm is not acceptable. The I.430 interface imposes a clock accuracy requirement better than ±100 ppm, and clock jitter must be significantly less. To overcome this problem, it is necessary to integrate the frequency change with a period greater than the correction rate, so that the applied sink device frequency correction is much more stable. An error of 83 ppm causes an I.430 frame slip approximately every 3 seconds, so that a correction rate of 3 Hz and an integration period of 3 seconds are a possible solution.
Whilst clock mastering is feasible, it is less than desirable due to the coarse clock adjustment and the limitation that only one device may act as clock master. In a number of applications, this synchronization method cannot be used.